using System;
public class O1Calc : IO1Transfrom
{
    public object exec(object root, object property)
    {
        CodeCalcVO vo = (CodeCalcVO)property;
        double self = Convert.ToDouble(O1Exec.codeDoProperty(root, vo.self));
        string symbol = vo.symbol;
        double target = Convert.ToDouble(O1Exec.codeDoProperty(root, vo.target));

        switch (symbol)
        {
            case "+":
                return self + target;
            case "-":
                return self - target;
            case "*":
                return self * target;
            case "/":
                return self / target;
            case "^":
                return Math.Pow(self, target);
        }

        return 0;
    }
}